perm filename BKMAC.PUB[BOO,JMC] blob sn#531721 filedate 1980-08-24 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.<< 			Feature summary
C00008 00003	.MACRO s(TAG,NAME) ⊂ sname ← SSNAME ← NULL 
C00012 00004	.<< 	The current font conventions for lisping are
C00017 ENDMK
C⊗;
.<< 			Feature summary
.Start with
.require "bkmac.pub[1,clt]" source;
.>>
.DEVICE XGP;
.pagehigh←54
.pagewide←80
.PAGE FRAME pagehigh HIGH pagewide WIDE;
.evenleftborder ← oddleftborder ← 1000;
.area text lines 4 to pagehigh;
.title area heading lines 1 to 3
.place text;
.sname←null;
.every heading(, {sname}, {page}) ;
.
.TURN ON "α%"; turn on "_" for "#" ;
.FONT 1 "BAXL30.FNT[FNT,CLT]";  << has improved ¬ >>
.FONT 2 "BAXM30";
.FONT 3 "baxb30.fnt[fnt,clt]";  << "|" in this file is a 4 pixel space>>
.FONT 4 "SUB";
.FONT 5 "SUP";
.FONT 6 "GACS25";
.<<FONT 6 "NGR25";>>
.FONT 7 "FIX20";
.FONT 8 "SYMB30.FNT[FNT,CLT]"; <<has collection of all symbols from Math30,grk30,and
.				ms25 that are used in the book  
.				grk symbols have original correspondence,
.				circle-c is called @, * is times op, # is cross-prod
.				| is bottom, & is integral sign, ∞ is the 
.				section symbol, π is the ¬ε symbol
.				the triple /
.				           {
.				           \ forms a three line curly bracket
.				>>
.FONT 9 "FIX25";
.FONT C "GRFX25";
.FONT D "GRFX35";
.
.
.macro cb(head) ⊂ if lines<7 then next page else skip; once center; select 3
head

.⊃
.macro bb(head) ⊂ if lines<7 then next page else skip; once select 3
head

.⊃
.
.MACRO eqnmac  ⊂
.count eqn inline  from 1 to 999 in subsection ;
.at "!eqn" lab " " ⊂ turnon "{}"; 
.next eqn;  
.eval("lab"&":") "("& subsection & "." & eqn & ")";  
.eval("lab"&"!:") subsection & "." & eqn;  
.eval("lab"&"!!:") section! & "." & subsection & "." & eqn;  
.send labindex ⊂}<{page}≤lab≥{⊃
."{subsection}.{eqn})"; turnoff ⊃
.
.at "!fcn" lab "&" tail " " ⊂ turnon "{}"; 
.next eqn;  
.eval("lab"&"tail"&":") "("& subsection & "." & eqn & ")";  
.eval("lab"&"tail"&"!:") subsection & "." & eqn;  
.eval("lab"&"tail"&"!!:") section! & "." & subsection & "." & eqn;  
."{subsection}.{eqn})"; 
.send fnindex ⊂}<{page}≤lab≥{⊃
.send labindex ⊂}<{page}≤lab tail≥{⊃
.turnoff ⊃
.
.<<formulas are signalled by !eqn followed by an optional identifier followed
.by the formula.  Formulas are counted within subsections.
.A reference to formula nn in its defining subsection is written {eqn nn}
.A reference in a different subsection within a section is written {eqn nn!}
.A reference in a different section is written {eqn nn!!}
.!eqne1 	x=x
.!eqne2 	y=y
.
.Equation {eqn e2} comes after {eqn e1}.
.NB!!! "{" must be turned on for the reference to work.
.>>
.  ⊃
.
.
.MACRO figmac ⊂
.count fig from 1 to 999;
.at "!fig" lab " " title "!" ⊂
.lab: next fig
.begin center turnon "{}"
%3Figure {fig}.%*  %1title%*
.turnoff end
.send labindex ⊂}<{page}≤lab≥{⊃
.skip 2 ⊃
. ⊃
.
.
.MACRO tablemac ⊂
.count table from 1 to 999;
.at "!table" lab " " title "!" ⊂
.lab: next table
.skip 1
.begin center turnon "{}"
%3Table {table}.%*  %1title%*
.turnoff end
.send labindex ⊂}<{page}≤lab≥{⊃
.skip 1  ⊃
. ⊃
.
.<<figures are labeled by doing "!figid title"  where id is an optional identifier 
. and title is the title printed after the figure number.
.  A reference to figure fn is
.written {fig fn}.  NB!!! "{" must be turned on for the reference to work.
.>>
.
.<<tables are done in the same way as figures.>>
.
.MACRO itemmac   ⊂
.count item inline
.at "#." ⊂ NEXT ITEM; (ITEM!); "."; ⊃
.count subitem inline in item;
.at "##." ⊂ NEXT SUBITEM; (ITEM!);".";(SUBITEM!);"."; ⊃;
.  ⊃
.MACRO s(TAG,NAME) ⊂ sname ← SSNAME ← NULL ;
.       IF SECHEAD ≠ NULL THEN START
.	    NEXT PAGE;
.           TAG: NEXT SECTION!;
.	BEGIN 
.	    CENTER select 3;
.	    Turnon "{"
{SECTIONTYPE} {SECTION!}
.	    SKIP
NAME
.	    SKIP;
.	    sname ← SECTIONTYPE & "  " & SECTION!
.	    SEND CONTENTS ⊂ SKIP 1; IF LINES ≤ 8 THEN NEXT PAGE;
{SECTION!}∂6NAME
.	⊃
.	    END;
.	    END;
.	ELSE START
.           next section;
.	    SECTION←NULL;
.	    NEXT PAGE;
.	    BEGIN 
.		CENTER select 3;
NAME
.	        SKIP;
.	        END;
.	    sname ← "NAME"
.	    SEND CONTENTS ⊂ SKIP 1; IF LINES ≤ 8 THEN NEXT PAGE;
NAME
.	⊃
.	    END	⊃

.MACRO SS(TAG,NAME) ⊂ SSNAME←"NAME";
.	IF LINES<8 THEN NEXT PAGE; 
.	TAG: NEXT SUBSECTION!;
.       EVAL("TAG"&"!:") SECTION! & " qsect" & SUBSECTION!;  
.	START
.	    FILL SKIP 2 TURN ON "{∂∞→\"
.	    SEND CONTENTS ⊂
∂(8){SUBSECTION!}∂(12)NAME\∞ ∞ ∞ ∞.→   {PAGE}
. ⊃
.	    END
.send labindex ⊂}<{page}≤TAG≥{⊃
{!}.  %3NAME%1
.	SKIP;
.	TURN OFF ; ⊃

.MACRO SET SECTIONPARS(SECPRINT, SSPRINT,SECTYPE,PAGEPRINT) ⊂
.SECHEAD←"SECPRINT"
.SECTIONTYPE←"SECTYPE"
.IF "SECPRINT" ≠ NULL THEN START
.	COUNT SECTION PRINTING "SECPRINT"
.	END ;
.IF "SSPRINT" ≠ NULL THEN START
.	COUNT SUBSECTION IN SECTION PRINTING "SSPRINT"
.	END;
.IF "PAGEPRINT" ≠ NULL THEN START
.       COUNT PAGE FROM 1 TO 988 PRINTING "PAGEPRINT" 
.	END;
.	⊃
.
.comment makes a table of contents;
.MACRO mkcontents ⊂
.sname ← SSNAME ← NULL;
.COUNT PAGE FROM 1 TO 999 PRINTING "i";
.PORTION CONTENTS;
.FILL NOJUST; CRBREAK turn on "←→∂\∞";
.INDENT 0,25,10 PREFACE 1 TABS 20,24,28,32,36,40,44,48,52,56,60,64,68,72
.once center select 3;
Table of Contents
.SKIP 2
→Page
.SKIP;
.sname ← "Table of Contents"
.select 1;
.RECEIVE
.turnoff ⊃
.
.comment  makes an index;
.macro mkindex (WHICHINDEX,WHICHSEND) ⊂
.    BEGIN "ANINDEX" FILL NOJUST INDENT 0,3 PREFACE 0 TURN ON "←→\{"
.	SET SECTIONPARS(,,,i)
.	PORTION WHICHSEND
.	AREA TEXTER LINES 6 TO pagehigh-3 IN 2 COLUMNS 3 APART
.	SELECT 1;
.	area indextitle lines 4 to 5 
.       place indextitle
.       s(WHICHSEND,WHICHINDEX)
.	PLACE TEXTER
.	WASWORD ← WASPG ← NULL ;
.	AT "<" PGNO "≤" PHRASE "≥" ⊂
.		IF "PHRASE" ≠ WASWORD THEN START BREAK }PHRASE   PGNO{ END
.		ELSE IF "PGNO" ≠ WASPG THEN }, PGNO{ ;
.		WASPG ← "PGNO" ; WASWORD ← "PHRASE" ; ⊃
.	RECEIVE "≤≥"
.	END "ANINDEX"
. ⊃
.<< 	The current font conventions for lisping are
.		S-expressions internal form delimited by "$$" ... "$"
.			words	"	"    flagged  by "$"
.		S-expressions external form delimited by "⊗⊗" ... "⊗"
.			words	"	"    flagged  by "⊗"
.		Operators, reserved words and other special symbols are flagged by 
.		    "q" and those that are prefix must be followed by a <space> which
.		    gets shortened. The exceptions are a, d, n and at where
.		    qqa, qqd, qqn and qqat will not effect any following space.
.		    eg. they may stand alone in text without an argument following.
.>>
.at "qGoedel" ⊂"G%8:%*odel"⊃
.at "qprog" ⊂"%3program%*"⊃
.at "qreturn" ⊂"%3return%*"⊃
.at "qgo" ⊂"%3go_to%*"⊃
.at "qNIL" ⊂"%6NIL%*"⊃
.at "qnil" ⊂"%6NIL%*"⊃
.at "qT" ⊂"%6T%*"⊃
.at "qtrue" ⊂"%3true%*"⊃
.at "qfalse" ⊂"%3false%*"⊃
.at "qif" ⊂"%3if%*"⊃
.at "qthen" ⊂"%3then%*"⊃
.at "qelse" ⊂"%3else%*"⊃
.at "qequal" ⊂"%3equal%*"⊃
.at "qeq" ⊂"%3eq%*"⊃
.at "qand" ⊂"%3and%*"⊃
.at "qor" ⊂"%3or%*"⊃
.at "qnot" ⊂"%3not%*"⊃
.at "qn " ⊂"%3n|%*"⊃
.at "qat " ⊂"%3at|%*"⊃
.at "qcons" ⊂"%3cons%*"⊃
.at "qaaaa " ⊂"%3aaaa|%*"⊃
.at "qaaad " ⊂"%3aaad|%*"⊃
.at "qaada " ⊂"%3aada|%*"⊃
.at "qaadd " ⊂"%3aadd|%*"⊃
.at "qadaa " ⊂"%3adaa|%*"⊃
.at "qadad " ⊂"%3adad|%*"⊃
.at "qadda " ⊂"%3adda|%*"⊃
.at "qaddd " ⊂"%3addd|%*"⊃
.at "qdaaa " ⊂"%3daaa|%*"⊃
.at "qdaad " ⊂"%3daad|%*"⊃
.at "qdada " ⊂"%3dada|%*"⊃
.at "qdadd " ⊂"%3dadd|%*"⊃
.at "qddaa " ⊂"%3ddaa|%*"⊃
.at "qddad " ⊂"%3ddad|%*"⊃
.at "qddda " ⊂"%3ddda|%*"⊃
.at "qdddd " ⊂"%3dddd|%*"⊃
.at "qaaa " ⊂"%3aaa|%*"⊃
.at "qaad " ⊂"%3aad|%*"⊃
.at "qada " ⊂"%3ada|%*"⊃
.at "qadd " ⊂"%3add|%*"⊃
.at "qdaa " ⊂"%3daa|%*"⊃
.at "qdad " ⊂"%3dad|%*"⊃
.at "qdda " ⊂"%3dda|%*"⊃
.at "qddd " ⊂"%3ddd|%*"⊃
.at "qaa " ⊂"%3aa|%*"⊃
.at "qad " ⊂"%3ad|%*"⊃
.at "qda " ⊂"%3da|%*"⊃
.at "qdd " ⊂"%3dd|%*"⊃
.at "qa " ⊂"%3a|%*"⊃
.at "qd " ⊂"%3d|%*"⊃
.at "qqn" ⊂"%3n%*"⊃
.at "qqat" ⊂"%3at%*"⊃
.at "qqa" ⊂"%3a%*"⊃
.at "qqd" ⊂"%3d%*"⊃
.
.at "qt" ⊂"%8t%*"⊃
.at "qW" ⊂"%8w%*"⊃
.at "qp" ⊂"%8f%*"⊃
.at "qP" ⊂"%8F%*"⊃
.at "qq" ⊂"%8y%*"⊃
.at "qQ" ⊂"%8Y%*"⊃
.at "qrho" ⊂"%8r%*"⊃
.at "qr" ⊂"%8x%*"⊃
.at "qx" ⊂"%8x%*"⊃
.at "qF" ⊂"%8F%*"⊃
.at "qz" ⊂"%8z%*"⊃
.at "qh" ⊂"%8h%*"⊃
.at "qα" ⊂"%8a%*"⊃
.at "qβ" ⊂"%8b%*"⊃
.
.at "qsect" ⊂"%8∞%*"⊃
.at "qcross" ⊂"%6x%*"⊃
.at "qEMPTY" ⊂"%8f%*"⊃
.at "qw" ⊂"%8|%*"⊃
.at "qb" ⊂"%8|%*"⊃
.at "q≤" ⊂"%8≤%*"⊃
.at "q*" ⊂"%8*%*"⊃
.at "qY" ⊂"%3Y%*"⊃
.
.at "q0" ⊂"%40%*"⊃
.at "q1" ⊂"%41%*"⊃
.at "q2" ⊂"%42%*"⊃
.at "q3" ⊂"%43%*"⊃
.at "q4" ⊂"%44%*"⊃
.at "q-" ⊂"%4n%*"⊃
.
.at "$$" SEXP "$" ⊂ g←"%"&thisfont; "%6SEXP"; TURNON "{}"; "{g}";TURNOFF; ⊃
.at "$" WORD " " ⊂ "%6WORD %*" ⊃
.at "⊗⊗⊗" bbexp "⊗" ⊂f←"%"&thisfont; TURNON "@" for "←"; "@%2bbexp"; TURNOFF;
.TURNON "{}"; "{f}"; TURNOFF;
.⊃
.at "⊗⊗" bbexp "⊗" ⊂ f←"%"&thisfont;  "%2bbexp"; TURNON "{}"; "{f}";TURNOFF;⊃           
.at "⊗"word" "	⊂ "%2word%* " ⊃